3.880 \(\int (a+b \sec (c+d x))^3 (A+B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\)

Optimal. Leaf size=207 \[ \frac{\tan (c+d x) \left (16 a^2 b B+3 a^3 C+6 a b^2 (3 A+2 C)+4 b^3 B\right )}{6 d}+\frac{\left (12 a^2 b (2 A+C)+8 a^3 B+12 a b^2 B+b^3 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{b \tan (c+d x) \sec (c+d x) \left (6 a^2 C+20 a b B+12 A b^2+9 b^2 C\right )}{24 d}+a^3 A x+\frac{(3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{12 d}+\frac{C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d} \]

[Out]

a^3*A*x + ((8*a^3*B + 12*a*b^2*B + 12*a^2*b*(2*A + C) + b^3*(4*A + 3*C))*ArcTanh[Sin[c + d*x]])/(8*d) + ((16*a
^2*b*B + 4*b^3*B + 3*a^3*C + 6*a*b^2*(3*A + 2*C))*Tan[c + d*x])/(6*d) + (b*(12*A*b^2 + 20*a*b*B + 6*a^2*C + 9*
b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + ((4*b*B + 3*a*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (C*(
a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)

________________________________________________________________________________________

Rubi [A]  time = 0.339917, antiderivative size = 207, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {4056, 4048, 3770, 3767, 8} \[ \frac{\tan (c+d x) \left (16 a^2 b B+3 a^3 C+6 a b^2 (3 A+2 C)+4 b^3 B\right )}{6 d}+\frac{\left (12 a^2 b (2 A+C)+8 a^3 B+12 a b^2 B+b^3 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{b \tan (c+d x) \sec (c+d x) \left (6 a^2 C+20 a b B+12 A b^2+9 b^2 C\right )}{24 d}+a^3 A x+\frac{(3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{12 d}+\frac{C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

a^3*A*x + ((8*a^3*B + 12*a*b^2*B + 12*a^2*b*(2*A + C) + b^3*(4*A + 3*C))*ArcTanh[Sin[c + d*x]])/(8*d) + ((16*a
^2*b*B + 4*b^3*B + 3*a^3*C + 6*a*b^2*(3*A + 2*C))*Tan[c + d*x])/(6*d) + (b*(12*A*b^2 + 20*a*b*B + 6*a^2*C + 9*
b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(24*d) + ((4*b*B + 3*a*C)*(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(12*d) + (C*(
a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d)

Rule 4056

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) +
 (a_))^(m_.), x_Symbol] :> -Simp[(C*Cot[e + f*x]*(a + b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int
[(a + b*Csc[e + f*x])^(m - 1)*Simp[a*A*(m + 1) + ((A*b + a*B)*(m + 1) + b*C*m)*Csc[e + f*x] + (b*B*(m + 1) + a
*C*m)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && IGtQ[2*m, 0]

Rule 4048

Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_.) +
 (a_)), x_Symbol] :> -Simp[(b*C*Csc[e + f*x]*Cot[e + f*x])/(2*f), x] + Dist[1/2, Int[Simp[2*A*a + (2*B*a + b*(
2*A + C))*Csc[e + f*x] + 2*(a*C + B*b)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int (a+b \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac{C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac{1}{4} \int (a+b \sec (c+d x))^2 \left (4 a A+(4 A b+4 a B+3 b C) \sec (c+d x)+(4 b B+3 a C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac{(4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac{C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac{1}{12} \int (a+b \sec (c+d x)) \left (12 a^2 A+\left (24 a A b+12 a^2 B+8 b^2 B+15 a b C\right ) \sec (c+d x)+\left (12 A b^2+20 a b B+6 a^2 C+9 b^2 C\right ) \sec ^2(c+d x)\right ) \, dx\\ &=\frac{b \left (12 A b^2+20 a b B+6 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac{(4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac{C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac{1}{24} \int \left (24 a^3 A+3 \left (8 a^3 B+12 a b^2 B+12 a^2 b (2 A+C)+b^3 (4 A+3 C)\right ) \sec (c+d x)+4 \left (16 a^2 b B+4 b^3 B+3 a^3 C+6 a b^2 (3 A+2 C)\right ) \sec ^2(c+d x)\right ) \, dx\\ &=a^3 A x+\frac{b \left (12 A b^2+20 a b B+6 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac{(4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac{C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac{1}{6} \left (16 a^2 b B+4 b^3 B+3 a^3 C+6 a b^2 (3 A+2 C)\right ) \int \sec ^2(c+d x) \, dx+\frac{1}{8} \left (8 a^3 B+12 a b^2 B+12 a^2 b (2 A+C)+b^3 (4 A+3 C)\right ) \int \sec (c+d x) \, dx\\ &=a^3 A x+\frac{\left (8 a^3 B+12 a b^2 B+12 a^2 b (2 A+C)+b^3 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{b \left (12 A b^2+20 a b B+6 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac{(4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac{C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}-\frac{\left (16 a^2 b B+4 b^3 B+3 a^3 C+6 a b^2 (3 A+2 C)\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{6 d}\\ &=a^3 A x+\frac{\left (8 a^3 B+12 a b^2 B+12 a^2 b (2 A+C)+b^3 (4 A+3 C)\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac{\left (16 a^2 b B+4 b^3 B+3 a^3 C+6 a b^2 (3 A+2 C)\right ) \tan (c+d x)}{6 d}+\frac{b \left (12 A b^2+20 a b B+6 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac{(4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac{C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d}\\ \end{align*}

Mathematica [B]  time = 5.51976, size = 525, normalized size = 2.54 \[ \frac{\cos (c+d x) (a+b \sec (c+d x))^3 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-12 \cos ^4(c+d x) \left (12 a^2 b (2 A+C)+8 a^3 B+12 a b^2 B+b^3 (4 A+3 C)\right ) \log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )+12 \cos ^4(c+d x) \left (12 a^2 b (2 A+C)+8 a^3 B+12 a b^2 B+b^3 (4 A+3 C)\right ) \log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+36 a^3 A (c+d x)+48 a^3 A (c+d x) \cos (2 (c+d x))+12 a^3 A (c+d x) \cos (4 (c+d x))+72 a^2 b B \sin (2 (c+d x))+36 a^2 b B \sin (4 (c+d x))+36 a^2 b C \sin (c+d x)+36 a^2 b C \sin (3 (c+d x))+24 a^3 C \sin (2 (c+d x))+12 a^3 C \sin (4 (c+d x))+72 a A b^2 \sin (2 (c+d x))+36 a A b^2 \sin (4 (c+d x))+36 a b^2 B \sin (c+d x)+36 a b^2 B \sin (3 (c+d x))+96 a b^2 C \sin (2 (c+d x))+24 a b^2 C \sin (4 (c+d x))+12 A b^3 \sin (c+d x)+12 A b^3 \sin (3 (c+d x))+32 b^3 B \sin (2 (c+d x))+8 b^3 B \sin (4 (c+d x))+33 b^3 C \sin (c+d x)+9 b^3 C \sin (3 (c+d x))\right )}{48 d (a \cos (c+d x)+b)^3 (A \cos (2 (c+d x))+A+2 B \cos (c+d x)+2 C)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(Cos[c + d*x]*(a + b*Sec[c + d*x])^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(36*a^3*A*(c + d*x) + 48*a^3*A*(c
 + d*x)*Cos[2*(c + d*x)] + 12*a^3*A*(c + d*x)*Cos[4*(c + d*x)] - 12*(8*a^3*B + 12*a*b^2*B + 12*a^2*b*(2*A + C)
 + b^3*(4*A + 3*C))*Cos[c + d*x]^4*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 12*(8*a^3*B + 12*a*b^2*B + 12*a^
2*b*(2*A + C) + b^3*(4*A + 3*C))*Cos[c + d*x]^4*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 12*A*b^3*Sin[c + d*
x] + 36*a*b^2*B*Sin[c + d*x] + 36*a^2*b*C*Sin[c + d*x] + 33*b^3*C*Sin[c + d*x] + 72*a*A*b^2*Sin[2*(c + d*x)] +
 72*a^2*b*B*Sin[2*(c + d*x)] + 32*b^3*B*Sin[2*(c + d*x)] + 24*a^3*C*Sin[2*(c + d*x)] + 96*a*b^2*C*Sin[2*(c + d
*x)] + 12*A*b^3*Sin[3*(c + d*x)] + 36*a*b^2*B*Sin[3*(c + d*x)] + 36*a^2*b*C*Sin[3*(c + d*x)] + 9*b^3*C*Sin[3*(
c + d*x)] + 36*a*A*b^2*Sin[4*(c + d*x)] + 36*a^2*b*B*Sin[4*(c + d*x)] + 8*b^3*B*Sin[4*(c + d*x)] + 12*a^3*C*Si
n[4*(c + d*x)] + 24*a*b^2*C*Sin[4*(c + d*x)]))/(48*d*(b + a*Cos[c + d*x])^3*(A + 2*C + 2*B*Cos[c + d*x] + A*Co
s[2*(c + d*x)]))

________________________________________________________________________________________

Maple [A]  time = 0.057, size = 389, normalized size = 1.9 \begin{align*}{a}^{3}Ax+{\frac{A{a}^{3}c}{d}}+{\frac{B{a}^{3}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+{\frac{{a}^{3}C\tan \left ( dx+c \right ) }{d}}+3\,{\frac{A{a}^{2}b\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}+3\,{\frac{B{a}^{2}b\tan \left ( dx+c \right ) }{d}}+{\frac{3\,{a}^{2}bC\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{2\,d}}+{\frac{3\,{a}^{2}bC\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}}+3\,{\frac{Aa{b}^{2}\tan \left ( dx+c \right ) }{d}}+{\frac{3\,Ba{b}^{2}\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{2\,d}}+{\frac{3\,Ba{b}^{2}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}}+2\,{\frac{Ca{b}^{2}\tan \left ( dx+c \right ) }{d}}+{\frac{Ca{b}^{2}\tan \left ( dx+c \right ) \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{d}}+{\frac{A{b}^{3}\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{2\,d}}+{\frac{A{b}^{3}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}}+{\frac{2\,B{b}^{3}\tan \left ( dx+c \right ) }{3\,d}}+{\frac{B{b}^{3}\tan \left ( dx+c \right ) \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{3\,d}}+{\frac{C{b}^{3}\tan \left ( dx+c \right ) \left ( \sec \left ( dx+c \right ) \right ) ^{3}}{4\,d}}+{\frac{3\,C{b}^{3}\sec \left ( dx+c \right ) \tan \left ( dx+c \right ) }{8\,d}}+{\frac{3\,C{b}^{3}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{8\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x)

[Out]

a^3*A*x+1/d*A*a^3*c+1/d*B*a^3*ln(sec(d*x+c)+tan(d*x+c))+a^3*C*tan(d*x+c)/d+3/d*A*a^2*b*ln(sec(d*x+c)+tan(d*x+c
))+3/d*B*a^2*b*tan(d*x+c)+3/2/d*a^2*b*C*sec(d*x+c)*tan(d*x+c)+3/2/d*a^2*b*C*ln(sec(d*x+c)+tan(d*x+c))+3/d*A*a*
b^2*tan(d*x+c)+3/2/d*B*a*b^2*sec(d*x+c)*tan(d*x+c)+3/2/d*B*a*b^2*ln(sec(d*x+c)+tan(d*x+c))+2/d*C*a*b^2*tan(d*x
+c)+1/d*C*a*b^2*tan(d*x+c)*sec(d*x+c)^2+1/2/d*A*b^3*sec(d*x+c)*tan(d*x+c)+1/2/d*A*b^3*ln(sec(d*x+c)+tan(d*x+c)
)+2/3/d*B*b^3*tan(d*x+c)+1/3/d*B*b^3*tan(d*x+c)*sec(d*x+c)^2+1/4/d*C*b^3*tan(d*x+c)*sec(d*x+c)^3+3/8/d*C*b^3*s
ec(d*x+c)*tan(d*x+c)+3/8/d*C*b^3*ln(sec(d*x+c)+tan(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.14788, size = 483, normalized size = 2.33 \begin{align*} \frac{48 \,{\left (d x + c\right )} A a^{3} + 48 \,{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a b^{2} + 16 \,{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B b^{3} - 3 \, C b^{3}{\left (\frac{2 \,{\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, C a^{2} b{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, B a b^{2}{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, A b^{3}{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, B a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 144 \, A a^{2} b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 48 \, C a^{3} \tan \left (d x + c\right ) + 144 \, B a^{2} b \tan \left (d x + c\right ) + 144 \, A a b^{2} \tan \left (d x + c\right )}{48 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

1/48*(48*(d*x + c)*A*a^3 + 48*(tan(d*x + c)^3 + 3*tan(d*x + c))*C*a*b^2 + 16*(tan(d*x + c)^3 + 3*tan(d*x + c))
*B*b^3 - 3*C*b^3*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*
x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 36*C*a^2*b*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) +
1) + log(sin(d*x + c) - 1)) - 36*B*a*b^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(si
n(d*x + c) - 1)) - 12*A*b^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) -
1)) + 48*B*a^3*log(sec(d*x + c) + tan(d*x + c)) + 144*A*a^2*b*log(sec(d*x + c) + tan(d*x + c)) + 48*C*a^3*tan(
d*x + c) + 144*B*a^2*b*tan(d*x + c) + 144*A*a*b^2*tan(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 0.594853, size = 624, normalized size = 3.01 \begin{align*} \frac{48 \, A a^{3} d x \cos \left (d x + c\right )^{4} + 3 \,{\left (8 \, B a^{3} + 12 \,{\left (2 \, A + C\right )} a^{2} b + 12 \, B a b^{2} +{\left (4 \, A + 3 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \,{\left (8 \, B a^{3} + 12 \,{\left (2 \, A + C\right )} a^{2} b + 12 \, B a b^{2} +{\left (4 \, A + 3 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (6 \, C b^{3} + 8 \,{\left (3 \, C a^{3} + 9 \, B a^{2} b + 3 \,{\left (3 \, A + 2 \, C\right )} a b^{2} + 2 \, B b^{3}\right )} \cos \left (d x + c\right )^{3} + 3 \,{\left (12 \, C a^{2} b + 12 \, B a b^{2} +{\left (4 \, A + 3 \, C\right )} b^{3}\right )} \cos \left (d x + c\right )^{2} + 8 \,{\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

1/48*(48*A*a^3*d*x*cos(d*x + c)^4 + 3*(8*B*a^3 + 12*(2*A + C)*a^2*b + 12*B*a*b^2 + (4*A + 3*C)*b^3)*cos(d*x +
c)^4*log(sin(d*x + c) + 1) - 3*(8*B*a^3 + 12*(2*A + C)*a^2*b + 12*B*a*b^2 + (4*A + 3*C)*b^3)*cos(d*x + c)^4*lo
g(-sin(d*x + c) + 1) + 2*(6*C*b^3 + 8*(3*C*a^3 + 9*B*a^2*b + 3*(3*A + 2*C)*a*b^2 + 2*B*b^3)*cos(d*x + c)^3 + 3
*(12*C*a^2*b + 12*B*a*b^2 + (4*A + 3*C)*b^3)*cos(d*x + c)^2 + 8*(3*C*a*b^2 + B*b^3)*cos(d*x + c))*sin(d*x + c)
)/(d*cos(d*x + c)^4)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (c + d x \right )}\right )^{3} \left (A + B \sec{\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))**3*(A+B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Integral((a + b*sec(c + d*x))**3*(A + B*sec(c + d*x) + C*sec(c + d*x)**2), x)

________________________________________________________________________________________

Giac [B]  time = 1.34382, size = 1025, normalized size = 4.95 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(d*x+c))^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

1/24*(24*(d*x + c)*A*a^3 + 3*(8*B*a^3 + 24*A*a^2*b + 12*C*a^2*b + 12*B*a*b^2 + 4*A*b^3 + 3*C*b^3)*log(abs(tan(
1/2*d*x + 1/2*c) + 1)) - 3*(8*B*a^3 + 24*A*a^2*b + 12*C*a^2*b + 12*B*a*b^2 + 4*A*b^3 + 3*C*b^3)*log(abs(tan(1/
2*d*x + 1/2*c) - 1)) - 2*(24*C*a^3*tan(1/2*d*x + 1/2*c)^7 + 72*B*a^2*b*tan(1/2*d*x + 1/2*c)^7 - 36*C*a^2*b*tan
(1/2*d*x + 1/2*c)^7 + 72*A*a*b^2*tan(1/2*d*x + 1/2*c)^7 - 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^7 + 72*C*a*b^2*tan(1
/2*d*x + 1/2*c)^7 - 12*A*b^3*tan(1/2*d*x + 1/2*c)^7 + 24*B*b^3*tan(1/2*d*x + 1/2*c)^7 - 15*C*b^3*tan(1/2*d*x +
 1/2*c)^7 - 72*C*a^3*tan(1/2*d*x + 1/2*c)^5 - 216*B*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 36*C*a^2*b*tan(1/2*d*x + 1/
2*c)^5 - 216*A*a*b^2*tan(1/2*d*x + 1/2*c)^5 + 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^5 - 120*C*a*b^2*tan(1/2*d*x + 1/
2*c)^5 + 12*A*b^3*tan(1/2*d*x + 1/2*c)^5 - 40*B*b^3*tan(1/2*d*x + 1/2*c)^5 - 9*C*b^3*tan(1/2*d*x + 1/2*c)^5 +
72*C*a^3*tan(1/2*d*x + 1/2*c)^3 + 216*B*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 36*C*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 216
*A*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 36*B*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 120*C*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 12*
A*b^3*tan(1/2*d*x + 1/2*c)^3 + 40*B*b^3*tan(1/2*d*x + 1/2*c)^3 - 9*C*b^3*tan(1/2*d*x + 1/2*c)^3 - 24*C*a^3*tan
(1/2*d*x + 1/2*c) - 72*B*a^2*b*tan(1/2*d*x + 1/2*c) - 36*C*a^2*b*tan(1/2*d*x + 1/2*c) - 72*A*a*b^2*tan(1/2*d*x
 + 1/2*c) - 36*B*a*b^2*tan(1/2*d*x + 1/2*c) - 72*C*a*b^2*tan(1/2*d*x + 1/2*c) - 12*A*b^3*tan(1/2*d*x + 1/2*c)
- 24*B*b^3*tan(1/2*d*x + 1/2*c) - 15*C*b^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d